package com.apex.restful.entity;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import java.util.Objects;

/**
 * Create by IntelliJ IDEA
 * 用户：王建
 * 日期：2018-4-7
 */
@Entity
public class RelationshipUsers {
    private String relaType;
    private String userId;
    private String deptId;
    private String posiId;
    private Integer deptLeader;
    private Integer userOrder;
    private Integer relaPrimary;
    private Integer statId;

    @Basic
    @Column(name = "RelaType")
    public String getRelaType() {
        return relaType;
    }

    public void setRelaType(String relaType) {
        this.relaType = relaType;
    }

    @Basic
    @Column(name = "UserID")
    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    @Id
    @Column(name = "DeptID")
    public String getDeptId() {
        return deptId;
    }

    public void setDeptId(String deptId) {
        this.deptId = deptId;
    }

    @Basic
    @Column(name = "PosiID")
    public String getPosiId() {
        return posiId;
    }

    public void setPosiId(String posiId) {
        this.posiId = posiId;
    }

    @Basic
    @Column(name = "DeptLeader")
    public Integer getDeptLeader() {
        return deptLeader;
    }

    public void setDeptLeader(Integer deptLeader) {
        this.deptLeader = deptLeader;
    }

    @Basic
    @Column(name = "UserOrder")
    public Integer getUserOrder() {
        return userOrder;
    }

    public void setUserOrder(Integer userOrder) {
        this.userOrder = userOrder;
    }

    @Basic
    @Column(name = "RelaPrimary")
    public Integer getRelaPrimary() {
        return relaPrimary;
    }

    public void setRelaPrimary(Integer relaPrimary) {
        this.relaPrimary = relaPrimary;
    }

    @Basic
    @Column(name = "StatID")
    public Integer getStatId() {
        return statId;
    }

    public void setStatId(Integer statId) {
        this.statId = statId;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        RelationshipUsers that = (RelationshipUsers) o;
        return Objects.equals(relaType, that.relaType) &&
                Objects.equals(userId, that.userId) &&
                Objects.equals(deptId, that.deptId) &&
                Objects.equals(posiId, that.posiId) &&
                Objects.equals(deptLeader, that.deptLeader) &&
                Objects.equals(userOrder, that.userOrder) &&
                Objects.equals(relaPrimary, that.relaPrimary) &&
                Objects.equals(statId, that.statId);
    }

    @Override
    public int hashCode() {

        return Objects.hash(relaType, userId, deptId, posiId, deptLeader, userOrder, relaPrimary, statId);
    }
}
